package com.multitrack.datatype;

public enum SocketMessage {
	
	AGREE_SUCCESS,
	AGREE_FAIL,
	ALREADY_ENTERED("Already Room Enter.."),
	ALREADY_JOIN_MEMBER_IN_EVENT,
	APP_JOIN("APPLICATION JOIN!!"),
	
	BAN_MEMBER("BAN_MEMBER!!"),
	BLACK_LIST("BLACK LIST!!"),
	
	CHANGE_LEADER("LEADER CHANGE!!"),
	CLEAR_MEMBER("MEMBER CLEAR!!"),
	CREATE_EVENT("CREATE EVENT"),
	
	ERROR("ERROR.."), 
	EVENT_JOIN("EVENT JOIN!!"),
	EVENT_QUIT("EVENT QUIT!!"),
	
	ID_FOUND("ID Found!!"), 
	ID_NOT_FOUND("ID Not Found.."),
	IS_MEMBER("CHECKED MEMBER"),
	IS_IN_EVENT("Checked in event member.."),
	
	CURR_LOCATION("Move Location!!"),
	
	NULL,
	
	RECORD_LOCATION("RECORD LOCATION!!"),
	
	REQUEST_ALL_MEMBER_CURRENT_LOCATION("REQUEST ALL MEMBER CURRENT LOCATION"),
	REQUEST_EVENT_INFO("REQUEST EVENT INFO!!"),
	REQUEST_EVENT_LIST("REQUEST EVENT LIST!!"),
	REQUEST_MEMBER_LIST("REQUEST MEMBER LIST!!"),
	REQUEST_MEMBER_TRACK("REQUEST MEMBER TRACK!!"),
	REQUEST_MEMBER_TRACK_MOVE("REQUEST MEMBER TRACK AND MOVE!!"),
	
	SEND_DESTINATION("SEND DESTINATION!!"),
	
	SQL_CONNECTION_SUCCESSFUL("MYSQL CONNECT SUCCESS!!"),
	SQL_CONNECTION_FALSE("MYSQL CONNECT FAIL!!"),
	
	SQL_QUERY_ERROR("Query Error.."),
	SQL_QUERY_FAIL("Query failed.."),
	SQL_QUERY_SUCCESS("Query Successed!!"),;	
	
	String explain;

	SocketMessage() {

		explain = null;
	}

	SocketMessage(String explain) {

		this.explain = explain;

	}

	public void print() {

		System.out.println(explain);
	}

	public String toString() {

		return explain;
	}
	
	public static String MESSAGE = "MESSAGE";
	
	static public SocketMessage getEnum(int ordinal) {
		SocketMessage[] list = SocketMessage.values();
		for (int i = 0; i < list.length; i++) {
			if (list[i].ordinal() == ordinal)
				return list[i];
		}
		return null;
	}
}
